package com.hy.mechanicalarm.baseapp;

import com.hy.mechanicalarm.constant.Constants;
import com.hy.mechanicalarm.utils.CommonUtil;
import com.hy.mechanicalarm.utils.SPUtil;

/**
 * Created by 韩银 on 2018/7/31 14:12
 * hanyinit@163.com
 */
public class MyApplication extends BaseApp {

    private static MyApplication application;
    @Override
    public void onCreate() {
        super.onCreate();
        initView();
        initData();
    }

    private void initData() {
        SPUtil spUtil = new SPUtil(getContext());
        /*spUtil.putInt(Constants.COMPOUND_MIN,0);
        spUtil.putInt(Constants.COMPOUND_MAX,25);
        spUtil.putInt(Constants.COMPOUND_CALIBRATION,5);
        spUtil.putInt(Constants.TEMPERATURE_MIN,0);
        spUtil.putInt(Constants.TEMPERATURE_MAX,200);
        spUtil.putInt(Constants.TEMPERATURE_CALIBRATION,5);
        spUtil.putInt(Constants.QUIET_TIMES,10);
        spUtil.putInt(Constants.HALT_TIMES,60);
        spUtil.putInt(Constants.MEASURE_TIMES,30);

        spUtil.putString(Constants.MEASURE_X,"0");
        spUtil.putString(Constants.MEASURE_Y,"0");
        spUtil.putString(Constants.MEASURE_Z,"0");
        spUtil.putString(Constants.GATE_POSITION_X,"0");
        spUtil.putString(Constants.GATE_POSITION_Y,"0");
        spUtil.putString(Constants.GATE_POSITION_Z,"0");*/
    }

    private void initView() {
        application = this;

    }
    public static MyApplication getApplication() {
        return application;
    }
}
